package com.telecom.mapper;

import com.telecom.entity.Person;
import com.telecom.entity.PersonQuery;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface PersonMapper {
    @Insert("insert into person(person_name,person_age) values(#{personName},#{personAge})")
    int insert(Person person);
    @Select("select p.person_id, p.person_name, p.person_age, d.driver_id, d.driver_type from person p join driver d on p.person_id = d.person_id")
    List<PersonQuery> selectList();
}
